﻿<Controls:SinacorWindow 
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
          xmlns:Custom="http://schemas.xceed.com/wpf/xaml/datagrid"
          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
          mc:Ignorable="d"
          xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls"
          xmlns:Validation="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient.Validation;assembly=Sinacor.Infra.UI.Controls"
          xmlns:Model="clr-namespace:Sinacor.UI.Bovespa.Alocacao.Model;assembly=Sinacor.UI.Bovespa.Alocacao.Model"
          WindowStartupLocation="CenterScreen" 
          WindowState="Maximized" 
          Title="{DynamicResource Bovespa.Alocacao.Label.EspecificacaoVendasemCobertura}" 
          x:Class="Sinacor.UI.Bovespa.Alocacao.View.SmartClient.EspecificacaoVendaSemCobertura" 
          ModulePlus="False"
          ModuleId="ORD">
    <Grid>
        <Controls:SinacorTabControl x:Name="tabVendasSemCobertura" IsSynchronizedWithCurrentItem="True">
            <Controls:SinacorTabItem x:Name="tabitemVendasSemCobertura" Header="{DynamicResource Bovespa.Alocacao.Label.AlocacaoCarteiras}">

                <Controls:SinacorExpanderContainer>
                    <Controls:SinacorExpanderContainer.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                    </Controls:SinacorExpanderContainer.RowDefinitions>
                    <Controls:SinacorExpander Name="ExpanderPesquisaAlocacao"
                        Header="{DynamicResource Bovespa.Alocacao.Label.Pesquisa}" 
                        Grid.Row="0" 
                        IsExpanded="True">
                        <Grid>
                            <Controls:SinacorLabel HorizontalAlignment="Left" 
												   Content="{DynamicResource Bovespa.Alocacao.Label.DataPregao}" 
												   Width="170" 
												   IsTargetFieldRequired="True"/>
                            <Controls:SinacorComboBox x:Name="cmbDataPregao"
                                                      HorizontalAlignment="Left" 
													  VerticalAlignment="Top" 
													  Margin="174,0,0,0"  
													  HeightPopup="250" 
													  Width="100" 
													  TabIndex="1"
                                                      IsRequired="True"                                                      
                                                      ItemsSource="{Binding Calendario}"                                                                                                            
                                                      SelectedValuePath="DataPregao"
                                                      DisplayMemberPath="DataPregao"
                                                      SelectedValue="{Binding Filtro.DataPregao}"
                                                      ItemStringFormat="d"/>
                            <Controls:SinacorCheckBox x:Name="ckbAlocacaoAutomatica"
                                                      VerticalAlignment="Top" 
													  Content="{DynamicResource Bovespa.Alocacao.Label.AlocacaoAutomatica}" 
                                                      IsChecked="True"
													  Margin="278,0,0,0"                                                       
													  Width="204" 
													  HorizontalAlignment="Left" 
													  TabIndex="2"/>
                            <Controls:SinacorLabel HorizontalAlignment="Left" 
												   Content="{DynamicResource Bovespa.Alocacao.Label.Ativo}" 
												   Width="66" 
												   Margin="486,0,0,0" 
												   VerticalAlignment="Top"/>
                            <Controls:SinacorTextBox x:Name="txtAtivoAlocacao"
                                                     Text="{Binding Filtro.Ativo}"
                                                     VerticalAlignment="Top"
												     Width="145" 
													 Margin="556,0,0,0"
													 HorizontalAlignment="Left"
                                                     MaxLength="12"
													 TabIndex="3"/>
                            <Controls:SinacorButton x:Name="btnPesquisaAtivosAlocacao"
                                                    OnBufferedClick="btnPesquisaAtivosAlocacao_OnBufferedClick"
                                                    HorizontalAlignment="Left" 
												    VerticalAlignment="Top" 
													Icon="IconButtonSearch" 
													Margin="705,0,0,0" 
													ToolTip="{DynamicResource Bovespa.Alocacao.Label.PesquisarAtivo}" 
													TabIndex="4"/>
                            <Controls:SinacorLabel HorizontalAlignment="Left" 
												   Content="{DynamicResource Bovespa.Alocacao.Label.Cliente}" 
												   Width="100" 
												   VerticalAlignment="Top" 
												   Margin="70,25,0,0"/>
                            <Controls:SinacorTextBox x:Name="txtClienteAlocacao"
                                                     Text="{Binding Filtro.ApelidoCliente}"
                                                     Margin="174,25,0,0" 
													 Width="308" 
													 HorizontalAlignment="Left" 
													 VerticalAlignment="Top"
                                                     MaxLength="18"
													 TabIndex="5"/>
                            <Controls:SinacorButton x:Name="btnClienteAlocacao"
                                                    HorizontalAlignment="Left" 
												    Icon="IconButtonClient" 
													Margin="486,25,0,0" 
                                                    OnBufferedClick="btnClienteAlocacao_OnBufferedClick"
													ToolTip="{DynamicResource Bovespa.Alocacao.Label.PesquisarCliente}" 
													VerticalAlignment="Top" 
													TabIndex="6"/>
                            <Controls:SinacorButton x:Name="btnPesquisarAlocacao"
                                                    HorizontalAlignment="Left" 
                                                    Click="btnPesquisarAlocacao_Click"
												    Content="{DynamicResource Bovespa.Alocacao.Label.Pesquisar}" 
													Margin="512,25,0,0" 
													Width="106" 
													IsDefault="True" 
													VerticalAlignment="Top"
                                                    CausesValidation="True"
													TabIndex="7"/>
                            <Controls:SinacorButton x:Name="btnNovaPesquisaAlocacao"
                                                    Click="btnNovaPesquisaAlocacao_Click"
                                                    HorizontalAlignment="Left" 
												    Margin="622,25,0,0" 
													VerticalAlignment="Top" 
													Width="106" 
													Content="{DynamicResource Bovespa.Alocacao.Label.NovaPesquisa}" 
													TabIndex="8"/>
                        </Grid>
                    </Controls:SinacorExpander>
                    <Controls:SinacorExpander  Grid.Row="1" 
											   Header="{DynamicResource Bovespa.Alocacao.Label.Negocios}" 
											   Margin="0,4,0,0" 
											   AllowExpand="False" IsExpanded="True">
                        <Controls:SinacorExpanderContainer>
                            <Controls:SinacorExpanderContainer.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto" />
                            </Controls:SinacorExpanderContainer.RowDefinitions>
                            <Grid Grid.Row="0">
                                <Controls:SinacorDataGrid  x:Name="dtgVendaSemCobertura"
                                                           IsEnabled="True" 
                                                           SelectionMode="Single" 
                                                           ItemsSource="{Binding ListaVendasDescobertas}"
                                                           SavingAll="dtgVendaSemCobertura_SavingAll" 
                                                           AllowCancelUpdate="True" 
                                                           AllowBeginInsert="False"
                                                           AllowCancelInsert="False"
                                                           AllowEndUpdate="True" 
                                                           AllowDelete="False"
                                                           AllowEndInsert="False"
                                                           AllowUndo="False"
                                                           AllowUndoAll="False"
                                                           AllowUndoLast="False"                                                                
                                                           CurrentCellChanged="dtgVendaSemCobertura_CurrentCellChanged"
                                                           CancelingUpdate="dtgVendaSemCobertura_CancelingUpdate" 
                                                           UpdateBegun="dtgVendaSemCobertura_UpdateBegun"
                                                           AllowSave="True"
                                                           >
                                    <Controls:SinacorDataGrid.Columns>
                                        <Controls:Column Name="Cliente"
			    										 Title="Bovespa.Alocacao.Label.Cliente"
                                                         DisplayMemberPath="Cliente"
                                                         AllowUpdate="False" 
                                                         IsRequired="False"
                                                         HorizontalCellAlignment="Right">
                                        </Controls:Column>
                                        <Controls:Column Name="Ativo"
			    										 Title="Bovespa.Alocacao.Label.Ativo"
                                                         DisplayMemberPath="Ativo"
                                                         AllowUpdate="False" 
                                                         IsRequired="False">
                                        </Controls:Column>
                                        <Controls:Column Name="Data"
			    										 Title="Bovespa.Alocacao.Label.Data"
                                                         DisplayMemberPath="DataPregao"
                                                         AllowUpdate="False" 
                                                         IsRequired="False"
                                                         HorizontalCellAlignment="Right">
                                        </Controls:Column>
                                        <Controls:Column Name="QuantDescoberta"
			    										 Title="Bovespa.Alocacao.Label.QuantDescoberta"
                                                         DisplayMemberPath="QuantidadeDescoberta"
                                                         AllowUpdate="False" 
                                                         IsRequired="False"        
                                                         Decimals="4" Integers="15"
                                                         HorizontalCellAlignment="Right">
                                        </Controls:Column>
                                        <Controls:Column Name="CMargem219Disponivel"
			    										 Title="Bovespa.Alocacao.Label.CMargem219Disponivel"
                                                         DisplayMemberPath="PosicaoCarteira219"                                                         
                                                         AllowUpdate="False" 
                                                         IsRequired="False"
                                                         HorizontalCellAlignment="Right">
                                        </Controls:Column>
                                        <Controls:Column Name="CMargem219Alocacao"
			    										 Title="Bovespa.Alocacao.Label.CMargem219Alocacao"
                                                         DisplayMemberPath="AlocacaoCarteira219"
                                                         AllowUpdate="True"
                                                         IsRequired="False" 
                                                         HorizontalCellAlignment="Right"
                                                         CellUpdateTemplate="{Binding Path=CellInsertTemplate, RelativeSource={RelativeSource Self}}">
                                            <Controls:Column.CellInsertTemplate>
                                                <DataTemplate>
                                                    <Controls:SinacorDecimalTextBox x:Name="TxtCMargem219Alocacao" Integers="15" Decimals="4"
                                                                 Value="{Binding AlocacaoCarteira219}"/>
                                                </DataTemplate>
                                            </Controls:Column.CellInsertTemplate>
                                        </Controls:Column>
                                        <Controls:Column Name="Garantia239Disponivel"
    	    										     Title="Bovespa.Alocacao.Label.Garantia239Disponivel"
                                                         DisplayMemberPath="PosicaoCarteira239"
                                                         AllowUpdate="False" 
                                                         IsRequired="False"
                                                         HorizontalCellAlignment="Right">
                                        </Controls:Column>
                                        <Controls:Column Name="Garantia239Alocacao"
			    										 Title="Bovespa.Alocacao.Label.Garantia239Alocacao"
                                                         DisplayMemberPath="AlocacaoCarteira239"
                                                         AllowUpdate="True"
                                                         IsRequired="False"
                                                         HorizontalCellAlignment="Right"
                                                         CellUpdateTemplate="{Binding Path=CellInsertTemplate, RelativeSource={RelativeSource Self}}">
                                            <Controls:Column.CellInsertTemplate>
                                                <DataTemplate>
                                                    <Controls:SinacorDecimalTextBox  x:Name="TxtGarantia239Alocacao" Integers="15" Decimals="4" 
                                                                 Value="{Binding AlocacaoCarteira239}"/>
                                                </DataTemplate>
                                            </Controls:Column.CellInsertTemplate>
                                        </Controls:Column>
                                        <Controls:Column Name="EmprAcoes280Disponivel"
			    										 Title="Bovespa.Alocacao.Label.EmprAcoes280Disponivel"
                                                         DisplayMemberPath="PosicaoCarteira280"
                                                         AllowUpdate="False" 
                                                         IsRequired="False"
                                                         HorizontalCellAlignment="Right">
                                        </Controls:Column>
                                        <Controls:Column Name="EmprAcoes280Alocacao"
			    										 Title="Bovespa.Alocacao.Label.EmprAcoes280Alocacao"
                                                         DisplayMemberPath="AlocacaoCarteira280"
                                                         AllowUpdate="True"
                                                         IsRequired="False"
                                                         CellUpdateTemplate="{Binding Path=CellInsertTemplate, RelativeSource={RelativeSource Self}}"
                                                         HorizontalCellAlignment="Right">
                                            <Controls:Column.CellInsertTemplate>
                                                <DataTemplate>
                                                    <Controls:SinacorDecimalTextBox x:Name="TxtEmprAcoes280Alocacao" Integers="15" Decimals="4" 
                                                                 Value="{Binding AlocacaoCarteira280}"/>
                                                </DataTemplate>
                                            </Controls:Column.CellInsertTemplate>
                                        </Controls:Column>
                                        <Controls:Column Name="Opcao274Disponivel"
			    										 Title="Bovespa.Alocacao.Label.Opcao274Disponivel"
                                                         DisplayMemberPath="PosicaoCarteira274"
                                                         AllowUpdate="False" 
                                                         IsRequired="False" HorizontalCellAlignment="Right">
                                        </Controls:Column>
                                        <Controls:Column Name="Opcao274Alocacao"
			    										 Title="Bovespa.Alocacao.Label.Opcao274Alocacao"
                                                         DisplayMemberPath="AlocacaoCarteira274"
                                                         AllowUpdate="True"
                                                         IsRequired="False"
                                                         CellUpdateTemplate="{Binding Path=CellInsertTemplate, RelativeSource={RelativeSource Self}}" HorizontalCellAlignment="Right">
                                            <Controls:Column.CellInsertTemplate>
                                                <DataTemplate>
                                                    <Controls:SinacorDecimalTextBox x:Name="TxtOpcao274Alocacao" Integers="15" Decimals="4" 
                                                                 Value="{Binding AlocacaoCarteira274}"/>
                                                </DataTemplate>
                                            </Controls:Column.CellInsertTemplate>
                                        </Controls:Column>
                                        <Controls:Column Name="QuantNaoAlocada"
			    										 Title="Bovespa.Alocacao.Label.QuantNaoAlocada"
                                                         DisplayMemberPath="QuantidadeNaoAlocada"
                                                         AllowUpdate="False" 
                                                         IsRequired="False"
                                                         HorizontalCellAlignment="Right">                                   
                                        </Controls:Column>
                                    </Controls:SinacorDataGrid.Columns>
                                </Controls:SinacorDataGrid>
                            </Grid>
                            <Controls:SinacorButton x:Name="btnSalvarAlocacao"
                                                HorizontalAlignment="Right" 
												Content="{DynamicResource Bovespa.Alocacao.Label.Salvar}"
                                                Click="btnSalvarAlocacao_Click"
												Margin="0,4,84,0" 
												Grid.Row="1"
                                                Width="80"
                                                TabIndex="9"/>
                            <Controls:SinacorButton x:Name="btnCancelarAlocacao"
                                                Grid.Row="1" 
                                                Click="btnCancelarAlocacao_Click"
												HorizontalAlignment="Right" 
												VerticalAlignment="Top" 
												Content="{DynamicResource Bovespa.Alocacao.Label.Cancelar}" 
												Margin="0,4,0,0"
                                                Width="80"
                                                TabIndex="10"/>
                        </Controls:SinacorExpanderContainer>
                    </Controls:SinacorExpander>
                    <Grid Grid.Row="2" 
							  Margin="0,4,0,0">
                        <Controls:SinacorTextBlock HorizontalAlignment="Left" 
							  						   VerticalAlignment="Top" 
													   Text="{DynamicResource Bovespa.Alocacao.Label.MsgIntA}" 
													   TextWrapping="NoWrap" 
													   Width="900" 
													   Height="Auto"/>
                        <Controls:SinacorTextBlock HorizontalAlignment="Left" 
													   VerticalAlignment="Top" 
													   Text="{DynamicResource Bovespa.Alocacao.Label.MsgIntB}" 
													   TextWrapping="NoWrap" 
													   Width="900" 
													   Margin="0,25,0,0"/>
                    </Grid>
                </Controls:SinacorExpanderContainer>

            </Controls:SinacorTabItem>

            <Controls:SinacorTabItem x:Name="tabitemCoberturaTermo" Header="{DynamicResource Bovespa.Alocacao.Label.CoberturaTermo}">
                <Controls:SinacorExpanderContainer>
                    <Controls:SinacorExpanderContainer.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                    </Controls:SinacorExpanderContainer.RowDefinitions>
                    <Controls:SinacorExpander 
                        Name="ExpanderPesquisa"
                        Grid.Row="0" 			
						HorizontalAlignment="Stretch"
						VerticalAlignment="Stretch"
						Header="{DynamicResource Bovespa.Alocacao.Label.Pesquisa}"
						IsExpanded="True">
                        <Grid>
                            <Controls:SinacorLabel HorizontalAlignment="Left" 
												   Content="{DynamicResource Bovespa.Alocacao.Label.DataMovimento}" 
												   IsTargetFieldRequired="True" 
												   Width="130"/>
                            <Controls:SinacorComboBox x:Name="cmbDataMovimento"
                                                      ItemStringFormat="d"
                                                      IsRequired="True"                                                      
                                                      ItemsSource="{Binding Calendario}"                                                                                                            
                                                      SelectedValuePath="DataPregao"
                                                      DisplayMemberPath="DataPregao"
                                                      SelectedValue="{Binding Filtro.DataPregao}"                                                      
                                                      HorizontalAlignment="Left"
													  VerticalAlignment="Top" 
													  Margin="134,0,0,0" 
													  Width="100" 
													  TabIndex="1"/>
                            <Controls:SinacorLabel HorizontalAlignment="Left" 
												   Width="110" 
												   Content="{DynamicResource Bovespa.Alocacao.Label.Bolsa}" 
												   IsTargetFieldRequired="True" 
												   Margin="238,0,0,0"/>
                            <Controls:SinacorComboBox x:Name="cmbBolsa"
                                                      IsRequired="True"
                                                      ItemsSource="{Binding Bolsas}"
                                                      SelectedValuePath="Codigo"
                                                      DisplayMemberPath="Descricao"
                                                      SelectedValue="{Binding Filtro.CodigoBolsa}"                                                      
                                                      HorizontalAlignment="Left" 
													  Margin="352,0,0,0" 
													  Width="265" 
													  VerticalAlignment="Top" 
													  WidthPopup="265" 
													  TabIndex="2"/>
                            <Controls:SinacorLabel HorizontalAlignment="Left" 
												   Content="{DynamicResource Bovespa.Alocacao.Label.Ativo}" 
												   Width="65" 
												   Margin="621,0,0,0" 
												   VerticalAlignment="Top" 
												   IsTargetFieldRequired="True"/>
                            <Controls:SinacorTextBox x:Name="txtAtivo"
                                                     Text="{Binding Filtro.Ativo}"
                                                     IsRequired="True"
                                                     RequiredErrorMessage="Bovespa.Alocacao.Message.AtivoObrigatorio"
                                                     VerticalAlignment="Top"
													 Width="145" 
													 Margin="690,0,0,0" 
                                                     MaxLength="16"
													 HorizontalAlignment="Left" 
													 TabIndex="3"/>
                            <Controls:SinacorButton x:Name="btnPesquisaAtivos"
                                                    OnBufferedClick="btnPesquisaAtivo_OnBufferedClick"
                                                    HorizontalAlignment="Left" 
												    VerticalAlignment="Top" 
													Icon="IconButtonSearch" 
													Margin="839,0,0,0" 
													ToolTip="{DynamicResource Bovespa.Alocacao.Label.PesquisarAtivo}" 
													TabIndex="4"/>
                            <Controls:SinacorLabel Content="{DynamicResource Bovespa.Alocacao.Label.Cliente}" 
												   Width="130" 
												   VerticalAlignment="Top" 
												   Margin="0,25,0,0" 
												   IsTargetFieldRequired="True" 
												   HorizontalAlignment="Left"/>
                            <Controls:SinacorTextBox x:Name="txtCliente"
                                                     Text="{Binding Filtro.ApelidoCliente}"
                                                     IsRequired="True"
                                                     RequiredErrorMessage="Bovespa.Alocacao.Message.ClienteObrigatorio"
                                                     Margin="134,25,0,0" 
											         Width="256" 
													 HorizontalAlignment="Left"
                                                     MaxLength="18"
													 VerticalAlignment="Top" 
													 TabIndex="5"/>
                            <Controls:SinacorButton x:Name="btnCliente"
                                                    OnBufferedClick="btnCliente_OnBufferedClick"
                                                    HorizontalAlignment="Left" 
													VerticalAlignment="Top" 
													Icon="IconButtonClient" 
													Margin="394,25,0,0" 
													ToolTip="{DynamicResource Bovespa.Alocacao.Label.PesquisarCliente}" 
													TabIndex="6"/>

                            <Controls:SinacorCheckBox x:Name="ckbCustodiaCorretora"
                                                      IsChecked="{Binding Filtro.CustodiaCorretora}"
	            				                      Content="{DynamicResource Bovespa.Alocacao.Label.CustodiaCorretora}" 
    	        				                      Width="197"
        	    				                      TabIndex="7"
								                      Margin="420,25,0,0"
								                      VerticalAlignment="Top"/>
                            <Controls:SinacorButton x:Name="btnPesquisar"
                                                    CausesValidation="True"
                                                    OnBufferedClick="btnPesquisar_OnBufferedClick"
                                                    HorizontalAlignment="Left" 
												    Content="{DynamicResource Bovespa.Alocacao.Label.Pesquisar}" 
													Margin="646,25,0,0" 
													Width="106" 
													VerticalAlignment="Top" 
													IsDefault="True" 
													TabIndex="8"/>
                            <Controls:SinacorButton x:Name="btnNovaPesquisa"
                                                    OnBufferedClick="btnNovaPesquisa_OnBufferedClick"
                                                    HorizontalAlignment="Left" 
													Margin="756,25,0,0" 
													VerticalAlignment="Top" 
													Width="106" 													
													Content="{DynamicResource Bovespa.Alocacao.Label.NovaPesquisa}" 
													TabIndex="9"/>
                        </Grid>
                    </Controls:SinacorExpander>

                    <Grid Grid.Row="1" 
						  Margin="0,4,0,0">
                        <Controls:SinacorExpanderContainer>
                            <Controls:SinacorExpanderContainer.ColumnDefinitions>
                                <ColumnDefinition Width="*" MinWidth="100" MaxWidth="1200"/>
                                <ColumnDefinition Width="5" />
                                <ColumnDefinition Width="*" MinWidth="100"/>
                            </Controls:SinacorExpanderContainer.ColumnDefinitions>

                            <Controls:SinacorExpander Grid.Column="0" 
												  Header="{DynamicResource Bovespa.Alocacao.Label.OperacoesVista}" 
												  AllowExpand="False"
												  IsExpanded="True"
												  VerticalSplitter="{Binding ElementName=OperacVistaSplitter}">
                                <Grid>
                                    <Controls:SinacorDataGrid Grid.Row="0"
                                            Name="dtgOperacoesVista" 
                                            IsEnabled="False"
                                            ItemsSource="{Binding OperacoesVista}"                                                         
                                            RowEditMode="AllCells"
                                            SavingAll="dtgOperacoesVista_SavingAll"
                                            UndoingAll="dtgOperacoesVista_UndoingAll"                                            
                                            AllowUndo="False"
                                            AllowUndoLast="False"
                                            AllowSave="False"
                                            >
                                        <Controls:SinacorDataGrid.ContextMenuTemplate>
                                            <DataTemplate>
                                                <StackPanel>
                                                    <Controls:SinacorContextMenuItem Name="menuCoberturaAutomatica"
                                                                             Header="{DynamicResource Bovespa.Alocacao.Label.CobAutom}"
                                                                                     Loaded="menuCoberturaAutomatica_Loaded"
                                                                                     IsEnabled="False"
                                                                                     Click="menuCoberturaAutomatica_Click"/>
                                                </StackPanel>
                                            </DataTemplate>
                                        </Controls:SinacorDataGrid.ContextMenuTemplate>

                                        <Controls:SinacorDataGrid.Columns>
                                            <Controls:Column Name="Oferta"
			    										     Title="Bovespa.Alocacao.Label.Oferta"
                                                             StringFormat="N0"
                                                             HorizontalCellAlignment="Right" 
                                                             DisplayMemberPath="NumeroOfertaMegaBolsa"
                                                             />
                                            <Controls:Column Name="Negocio"
			    										     Title="Bovespa.Alocacao.Label.Negocio"
                                                             DisplayMemberPath="NumeroNegocio"
                                                             StringFormat="N0"
                                                             HorizontalCellAlignment="Right"   
                                                             />
                                            <Controls:Column Name="Ativo"
			    										     Title="Bovespa.Alocacao.Label.Ativo"
                                                             DisplayMemberPath="Ativo"
                                                             />
                                            <Controls:Column Name="QuantEspecificada"
			    										     Title="Bovespa.Alocacao.Label.QuantEspecificada"
                                                             StringFormat="N4"
                                                             HorizontalCellAlignment="Right"                                                             
                                                             DisplayMemberPath="Quantidade"
                                                             />
                                            <Controls:Column Name="QuantCobertura"
			    										     Title="Bovespa.Alocacao.Label.QuantCobertura"
                                                             AllowUpdate="True"
                                                             AllowInsert="False"
                                                             HorizontalCellAlignment="Right" 
                                                             Integers="11" 
                                                             Decimals="4" 
                                                             StringFormat="n4"
                                                             DisplayMemberPath="QuantidadeCarteira268">
                                                <Controls:Column.CellUpdateTemplate>
                                                    <DataTemplate>
                                                        <Controls:SinacorDecimalTextBox 
                                                                                 Name="txtQuantidade"
                                                                                 Value="{Binding QuantidadeCarteira268}"
                                                                                 IsRequired="True"
                                                                                 Integers="11"
                                                                                 Decimals="4"                                                                                 
                                                            >
                                                            <Controls:SinacorDecimalTextBox.ValidationRules>
                                                                <Validation:EventValidationRule Validating="txtQuantidade_Validating"/>
                                                            </Controls:SinacorDecimalTextBox.ValidationRules>
                                                        </Controls:SinacorDecimalTextBox>
                                                    </DataTemplate>
                                                </Controls:Column.CellUpdateTemplate>
                                            </Controls:Column>

                                            <Controls:Column Name="VlTotal"
			    										     Title="Bovespa.Alocacao.Label.VlTotal"
                                                             StringFormat="N8"
                                                             HorizontalCellAlignment="Right"
                                                             DisplayMemberPath="ValorTotal"
                                                             />
                                            <Controls:Column Name="VlCobertura"
			    										     Title="Bovespa.Alocacao.Label.VlCobertura"
                                                             StringFormat="N8"
                                                             HorizontalCellAlignment="Right"
                                                             DisplayMemberPath="ValorTotalCarteira268"
                                                             />
                                            <Controls:Column Name="TpLiq."
			    										     Title="Bovespa.Alocacao.Label.TpLiq"
                                                             DisplayMemberPath="TipoLiquidacao"
                                                             />
                                            <Controls:Column Name="Usuario"
			    										     Title="Bovespa.Alocacao.Label.Usuario"
                                                             DisplayMemberPath="CodigoUsuarioFinal"
                                                             />
                                            <Controls:Column Name="Cliente"
			    										     Title="Bovespa.Alocacao.Label.Cliente"
                                                             DisplayMemberPath="CodigoClienteFinal"
                                                             />
                                            <Controls:Column Name="DVCliente"
			    										     Title="Bovespa.Alocacao.Label.DVCliente"
                                                             DisplayMemberPath="DigitoClienteFinal"
                                                             />
                                        </Controls:SinacorDataGrid.Columns>
                                    </Controls:SinacorDataGrid>
                                </Grid>
                            </Controls:SinacorExpander>

                            <Controls:SinacorVerticalGridSplitter x:Name="OperacVistaSplitter" Grid.Column="1" Width="2" Margin="3,0,0,0"/>

                            <Controls:SinacorExpander Grid.Column="2" 
												  Header="{DynamicResource Bovespa.Alocacao.Label.OperacoesTermo}" 
												  AllowExpand="False" 
												  Margin="4,0,0,0" IsExpanded="True">
                                <Grid>
                                    <Controls:SinacorDataGrid Grid.Row="0"
                                                              Name="dtgOperacoesTermo"
                                                              IsEnabled="False" 
                                                              ItemsSource="{Binding OperacoesTermo}"
                                                              >
                                        <Controls:SinacorDataGrid.Columns>
                                            <Controls:Column Name="Negocio"
			    										     Title="Bovespa.Alocacao.Label.Negocio"
                                                             StringFormat="N0"
                                                             HorizontalCellAlignment="Right"
                                                             DisplayMemberPath="NumeroNegocio"
                                                             />
                                            <Controls:Column Name="Ativo"
			    										     Title="Bovespa.Alocacao.Label.Ativo"
                                                             DisplayMemberPath="Ativo"
                                                             />
                                            <Controls:Column Name="QuantEspecificada"
			    										     Title="Bovespa.Alocacao.Label.QuantEspecificada"
                                                             StringFormat="N4"
                                                             HorizontalCellAlignment="Right"
                                                             DisplayMemberPath="Quantidade"
                                                             />
                                            <Controls:Column Name="VlTotal"
			    										     Title="Bovespa.Alocacao.Label.VlTotal"
                                                             StringFormat="N8"
                                                             HorizontalCellAlignment="Right"
                                                             DisplayMemberPath="ValorTotal"
                                                             />
                                            <Controls:Column Name="Prazo"
			    										     Title="Bovespa.Alocacao.Label.Prazo"
                                                             DisplayMemberPath="VencimentoTermo"
                                                             />
                                        </Controls:SinacorDataGrid.Columns>
                                    </Controls:SinacorDataGrid>
                                </Grid>
                            </Controls:SinacorExpander>
                        </Controls:SinacorExpanderContainer>
                    </Grid>

                    <Grid Grid.Row="2" 
						  Margin="0,4,0,0">
                        <Controls:SinacorLabel HorizontalAlignment="Left" 
														   VerticalAlignment="Top" 
														   Content="{DynamicResource Bovespa.Alocacao.Label.Quantidade}" 
														   Width="125" 
														   Margin="115,4,0,0" 
														   HorizontalContentAlignment="Center"/>
                        <Controls:SinacorLabel HorizontalContentAlignment="Center"
														   VerticalAlignment="Top" 
														   Content="{DynamicResource Bovespa.Alocacao.Label.Valor}" 
														   Margin="244,4,0,0" 
														   Width="150" HorizontalAlignment="Left"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 
														   Content="{DynamicResource Bovespa.Alocacao.Label.TotalVista}" 
														   Margin="20,25,0,0" 
														   Width="91"/>
                        <Controls:SinacorDecimalTextBox x:Name="txtQtdTotalVista"
                                                        Value = "{Binding Indicadores.QtdeTotalVista}"
                                                                    HorizontalAlignment="Left" 
																    VerticalAlignment="Top" 
																	Margin="115,25,0,0" 
																	Integers="16" 
																	Decimals="4" 
																	Width="125"                                                                    
																	IsEnabled="False"/>
                        <Controls:SinacorDecimalTextBox x:Name="txtValorTotalVista"
                                                        Value = "{Binding Indicadores.ValorTotalVista}"
                                                                    HorizontalAlignment="Left" 
																	VerticalAlignment="Top" 
																	Margin="244,25,0,0" 
																	Width="150" 
																	IsEnabled="False" 
																	Integers="19" 
																	Decimals="8"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 
														   Content="{DynamicResource Bovespa.Alocacao.Label.Termo}" 
														   Margin="20,50,0,0" 
														   Width="91"/>
                        <Controls:SinacorDecimalTextBox x:Name="txtQtdTermo"
                                                        Value="{Binding Indicadores.QtdeTotalTermo}"
                                                                    HorizontalAlignment="Left" 
																	VerticalAlignment="Top" 
																	Margin="115,50,0,0" 
																	Integers="16" 
																	Decimals="4" 
																	Width="125" 
																	IsEnabled="False"/>
                        <Controls:SinacorDecimalTextBox x:Name="txtValorTermo"
                                                        Value="{Binding Indicadores.ValorTotalTermo}"
                                                                    HorizontalAlignment="Left" 
																	VerticalAlignment="Top" 
																	Margin="244,50,0,0" 
																	Width="150" 
																	IsEnabled="False" 
																	Integers="19" 
																	Decimals="8"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 
														   Content="{DynamicResource Bovespa.Alocacao.Label.Cobertura}" 
														   Margin="20,75,0,0" 
														   Width="91"/>
                        <Controls:SinacorDecimalTextBox x:Name="txtQtdCobertura"
                                                        Value="{Binding Indicadores.QtdeTotalCobertura}"
                                                                    HorizontalAlignment="Left" 
																	VerticalAlignment="Top"
																	Margin="115,75,0,0" 
																	Integers="16" 
																	Decimals="4" 
																	Width="125" 
																	IsEnabled="False"/>
                        <Controls:SinacorDecimalTextBox x:Name="txtValorCobertura"
                                                        Value="{Binding Indicadores.ValorTotalCobertura}"
                                                                    HorizontalAlignment="Left" 
																	VerticalAlignment="Top" 
																	Margin="244,75,0,0" 
																	Width="150" 
																	IsEnabled="False" 
																	Integers="19" 
																	Decimals="8"/>
                        <Controls:SinacorLabel x:Name="lblPercentualFinanciamento"
                                                           HorizontalAlignment="Left" 
														   Content="{DynamicResource Bovespa.Alocacao.Label.Financiamento}" 
														   Width="157" Margin="398,50,0,0"/>
                        <Controls:SinacorDecimalTextBox x:Name="txtPercentualFinanciamento"
                                                        Value="{Binding Indicadores.PercentualTermo}"
                                                                    VerticalAlignment="Top"
																	Integers="8" 
																	Decimals="4" 
																	Width="70"
																	IsEnabled="False" 
																	HorizontalAlignment="Left" 
																	Margin="559,50,0,0"
                                                        AcceptsNegative="True"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 
														   Content="{DynamicResource Bovespa.Alocacao.Label.FinanciamentoCoberto}" 
														   Width="157" 
														   Margin="398,75,0,0"/>
                        <Controls:SinacorDecimalTextBox x:Name="txtPercentualFinaciamentoCoberto"
                                                        Value="{Binding Indicadores.PercentualCoberto}"
                                                                    VerticalAlignment="Top" 
																    Integers="8" 
																	Decimals="4" 
																	Width="70" 
																	IsEnabled="False" 
																	HorizontalAlignment="Left" 
																	Margin="559,75,0,0"
                                                        AcceptsNegative="True"/>
                        <Controls:SinacorLabel Content="{DynamicResource Bovespa.Alocacao.Label.CarteiraCobertura}" 
												   Width="136" 
												   VerticalAlignment="Top" 
												   Margin="647,50,0,0" 
												   HorizontalAlignment="Left"
                                                   IsTargetFieldRequired="True"/>

                        <Controls:SinacorComboBox x:Name="cmbCarteiraCobertura"
                                  HorizontalAlignment="Left" 
                                  ItemsSource="{Binding Carteiras}"
                                  SelectedValue="{Binding Filtro.Carteira}"
                                  SelectionChanged="cmbCarteiraCobertura_SelectionChanged"
                                  IsRequired="True"
								  Margin="787,50,0,0" 
								  Width="55" 
								  VerticalAlignment="Top" 
								  TabIndex="10"        
                        />

                        <Controls:SinacorButton HorizontalAlignment="Left" 
                                                Name="btnCancelar"
                                                Click="btnCancelar_Click"
												VerticalAlignment="Top" 
												Content="{DynamicResource Bovespa.Alocacao.Label.Cancelar}" 
                                                IsEnabled="False"
												Margin="761,75,0,0"
												Width="80"
                                                TabIndex="11"/>

                        <Controls:SinacorButton HorizontalAlignment="Left" 
                                                Name="btnSalvar"
                                                Click="btnSalvar_Click"
                                                IsEnabled="False"
												Content="{DynamicResource Bovespa.Alocacao.Label.Salvar}"
												VerticalAlignment="Top"
												Margin="677,75,0,0"
												Width="80"
                                                TabIndex="12"/>

                    </Grid>

                </Controls:SinacorExpanderContainer>
            </Controls:SinacorTabItem>
        </Controls:SinacorTabControl>
    </Grid>
</Controls:SinacorWindow>